package com.blb.community.pojo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("zy_owner")
public class ZyOwner implements Serializable {

  @TableId(value = "owner_id")
  @JsonFormat(shape = JsonFormat.Shape.STRING)
  private BigInteger ownerId;
  private String ownerNickname;
  private String ownerRealName;
  private String ownerGender;
  private Long ownerAge;
  private String ownerIdCard;
  private String ownerPhoneNumber;
  private String ownerOpenId;
  private String ownerWechatId;
  private String ownerQqNumber;
  @JsonDeserialize(using = LocalDateTimeDeserializer.class)
  @JsonSerialize(using = LocalDateTimeSerializer.class)
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  private LocalDateTime ownerBirthday;
  private String ownerPortrait;
  private String ownerSignature;
  private String ownerStatus;
  private String ownerLogonMode;
  private String ownerType;
  private String ownerPassword;
  private String createBy;
  @JsonDeserialize(using = LocalDateTimeDeserializer.class)
  @JsonSerialize(using = LocalDateTimeSerializer.class)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;
  private String updateBy;
  @JsonDeserialize(using = LocalDateTimeDeserializer.class)
  @JsonSerialize(using = LocalDateTimeSerializer.class)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime updateTime;
  private String remark;

  @TableField(exist = false)
  private String communityName;
  @TableField(exist = false)
  private String buildingName;
  @TableField(exist = false)
  private String unitName;
  @TableField(exist = false)
  private String roomName;

}
